<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--    <script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=OZEoipk5UII7aZjwD4P4wGjLro2xXYRB"></script>-->

    <script type="text/javascript" src="http://api.map.baidu.com/api?ak=PlhFWpA02aoURjAOpnWcRGqw7AI8EEyO&v=2.0&services=false"></script>
    <title>批量地址解析</title>
    <style>
    </style>
</head>
<body>
<div class="ui-form-item ui-border-b">
    <label> 事发地点： </label>
    <input placeholder="请输入事发地点" id="sfdd" name="sfdd" type="text" style="padding-right: 25px;">
    <a href="javascript:getCurrPosition();" class="ui-icon-pin pull-right"></a>
</div>
<script>
    var map = new BMap.Map("l-map");
    var point = new BMap.Point(116.331398,39.897445);
    // map.centerAndZoom(point,12);

    function myFun(result){
        var cityName = result.name;
        map.setCenter(cityName);
        alert("当前定位城市:"+cityName);
    }
    var myCity = new BMap.LocalCity();
    myCity.get(myFun);

</script>
</body>
</html>